<template>
	<view @tap="toTickets()" class="line-list-item line-list-item-border-bottom">
		<view
			class="line-list-item-router">
			<text>{{fromCity}}</text>
			<text style="margin: 0 20upx;">一</text>
			<!-- <image src="../../../static/icon_router_target.png" /> -->
			<text>{{endCity}}</text>
		</view>
		<view class="line-list-item-booking">
			<view>
				<text space="emsp"  style="color: red; font-size: 28rpx;">
					￥ <text space="emsp"  style="color: red; font-size: 38rpx;">{{` ${Number(ticketPrice)}`}}</text>
				</text>
				
			</view>
			<view @tap="toTickets()" class="booking-btn" hover-class="booking-btn-hove">
				<text>预定</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "RouterItem",
		props: {
			fromCity: {
				type: String,
				default: "",
			},
			endCity: {
				type: String,
				default: "",
			},
			ticketPrice: {
				type: String,
				default: "",
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			toTickets() {
				this.$emit("toTickets");
			},
		}
	}
</script>

<style lang="scss">
	.line-list-item {
		height: 100upx;
		display: flex;
		flex-direction: row;
		align-items: center;
		margin: 20upx;
		justify-content: space-between;
		.line-list-item-router {
			display: flex;
			flex: 1;
			flex-direction: row;
			font-size: 34rpx;
			font-weight: 400;
			image {
				width: 40upx;
				height: 50upx;
				margin-left: 10upx;
				margin-right: 10upx;
			}
		}
		.line-list-item-booking {
			display: flex; 
			flex-direction: row;
			.booking-btn-hove {
				opacity: 0.8;
			}
			.booking-btn {
				display: flex;
				flex-direction: row;
				align-items: center;
				justify-content: center;
				width: 75upx;
				height: 45upx;
				text-align: center;
				font-size: 26rpx;
				color: #FFFFFF;
				// padding-left: 5upx;
				// padding-right: 5upx;
				margin-left: 30upx;
				border-radius: 10upx;
				background: linear-gradient(to right, #FF9C4E, #FF603F);
			}
		}
	}
	.line-list-item-border-bottom {
		border-bottom: 3upx solid #EFEFEF;
	}
</style>
